home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / New System Software Extensions / QuickDraw™ GX v1.0ß2 / Sample Code / Printing Samples / Extensions… / UserItems extension ƒ / UserItems.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-09-09  |  2.0 KB  |  69 lines  |  [TEXT/MPS ]

  1. /*________________________________________________________
  2.  
  3.     File: UserItems.h
  4.  
  5.     C header file for a printing extension that shows how
  6.     to handle hits and updates for userItems in panels.
  7.  
  8.     Dave Hersey
  9.     Apple Developer Technical Support
  10.  
  11.     06/06/93 - dmh - Created.
  12.     09/07/93 - dmh - Updated to b2.
  13.  
  14.     (Note: labels are in the Mark menu.)
  15.     
  16. __________________________________________________________*/
  17.  
  18. #include <Types.h>
  19. #include <Errors.h>
  20. #include <Exceptions.h>
  21. #include <Resources.h>
  22. #include <ToolUtils.h>
  23. #include <Collections.h>
  24. #include <Messages.h>
  25. #include <PrintingManager.h>
  26. #include <PrintingMessages.h>
  27.  
  28. #define kCreator                    'U$∑®'            /* Our creator type.            */
  29. #define kExtensionCollectionType    kCreator        /* The collection type we use.    */
  30.  
  31. #define r_ExtensionPanel            6000            /* The ID of our dialog panel.    */
  32. #define kExtensionTurnedOff            0                /* We're turned on.                */
  33. #define kExtensionTurnedOn            1                /* We're turned off.            */
  34.  
  35. #define kDefaultSetting            kExtensionTurnedOn    /* We're on by default.            */
  36.  
  37. #define kMyUserItem                    3                /* DITL item #3 is a user item.    */
  38.  
  39.  
  40. typedef struct ExtensionCollection                    /* This is our collection type.    */
  41. {
  42.     char    extTurnedOn;                            /* Are we enabled?                */
  43.     char    fillByte;
  44. } ExtensionCollection;
  45.  
  46.  
  47. // Prototypes:
  48.  
  49. extern    long A5Size (void);                            /* We need these to set up        */
  50. extern    void A5Init (void *);                        /* our A5 world.                */
  51.  
  52. OSErr    InitGlobalData(void);
  53. OSErr    NewInitialize(void);
  54. OSErr    NewShutDown(void);
  55. OSErr    NewJobPrintDialog(gxDialogResult *dlogResult);
  56. OSErr    NewHandlePanelEvent(gxPanelInfoRecord *panelInfo);
  57. OSErr    NewFilterPanelEvent(gxPanelInfoRecord *panelInfo, Boolean *returnImmed);
  58. OSErr    HandlePanelUpdate(DialogPtr theDialog, gxPanelInfoRecord *panelInfo);
  59. OSErr    HandlePanelHit(DialogPtr theDialog, gxPanelInfoRecord *panelInfo,
  60.                        short theItem, Boolean *returnImmed);
  61. OSErr    SetUpPrintPanel(void);
  62. OSErr    StoreJobCollectionItem(void *collectItem, long collectSize, OSType collectType,
  63.                                short collectID, Boolean newItem);
  64.  
  65.  
  66. typedef struct MyGlobalRec {
  67.         PicHandle    panelPict;
  68. } MyGlobalRec;
  69.